package com.dreamscope.content;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HomePageWriter extends HttpServlet{
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		response.setContentType("text/html");
		PrintWriter out = response.getWriter();
		
		StringBuffer contentString = new StringBuffer(); 
		contentString.append("<div class=\"mainLayout\">");
		contentString.append("<div class=\"mainContent\">");
		contentString.append("<img src=\"./images/logo.GIF\" style=\"vertical-align: middle;\"/> ");
		contentString.append("is an online portal that will give you almost everything you can dream about. We are committed to provide an online portal which can serve all people with something of there interrest.");
		contentString.append("</div>");
		contentString.append("<div class=\"loginBox\">");
		contentString.append("<div class=\"topl\"></div>");
		contentString.append("<div class=\"topm\"></div>");
		contentString.append("<div class=\"topr\"></div>");
		contentString.append("<div class=\"boxContent\">");
		contentString.append("<table>");
		contentString.append("<tr><td colspan=\"2\" align=\"center\"><b>Member Login</b></td></tr>");
		contentString.append("<tr><td class=\"col1\"><b>Username</b></td><td><input type=\"text\" id=\"uname\" name=\"uname\" value=\"\"/></td></tr>");
		contentString.append("<tr><td class=\"col1\"><b>Password</b></td><td><input type=\"password\" id =\"pwd\" name=\"pwd\" value=\"\"/></td></tr>");
		contentString.append("<tr><td colspan=\"2\" align=\"center\"><input name=\"Login\" type=\"button\" onclick=\"javascript:authUser(document.getElementById('uname').value,document.getElementById('pwd').value);\" value=\"Login\"/></td></tr>");
		contentString.append("<tr><td colspan=\"2\" align=\"center\">&nbsp;</td></tr>");
		contentString.append("<tr><td colspan=\"2\" align=\"center\"><b>Become a member  <a href=\"#\">Sign-Up</a></b></td></tr>");
		contentString.append("</table>");
		contentString.append("</div>");
		contentString.append("<div class=\"botl\"></div>");
		contentString.append("<div class=\"botm\"></div>");
		contentString.append("<div class=\"botr\"></div>");
		contentString.append("</div>");
		contentString.append("</div>");
		
		out.print(contentString);
	}
}
